package com.service.mybatis.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.common.utils.tool.UserUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 基本父类
 *  创建人和删除标记绑定使用
 * @author ccf
 * @Date 2022/3/14 20:18
 */
@Setter
@Getter
@NoArgsConstructor
public class BasicEntity extends SuperEntity {

    public BasicEntity(String id) {
        super(id);
    }

    public static final String CREATOR_FIELD = "creator";

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NEVER)
    @JSONField(label = UserUtil.USER_LABEL)
    private String creator;

}
